﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpPickInterface.h"
#include "IObject.h"

namespace gcmp {

    class IPickResult;
    class IPointPickContext;
    class IRectPickContext;
    class IPolygonPickContext;

    /// \brief 拾取功能入口
    ///
    /// 包括按点拾取和按矩形框拾取
    class GCMP_PICK_INTERFACE_EXPORT IPicker : IObject
    {
    public:
        /// \brief 按点拾取,根据拾取输入信息，得到一组拾取候选结果
        /// 
        /// \param pickContext 按点拾取上下文
        /// \return 拾取候选集
        static OwnerPtr<IPickResult> PickByPoint(const IPointPickContext* pickContext);

        /// \brief 按矩形框拾取,根据拾取输入信息，得到一组拾取候选结果
        /// 
        /// \param pickContext 按矩形框拾取上下文
        /// \return 拾取候选集
        static OwnerPtr<IPickResult> PickByRectangle(const IRectPickContext* pickContext);

        /// \brief 按多边形拾取,根据拾取输入信息，得到一组拾取候选结果
        /// 
        /// \param pickContext 按多边形拾取上下文
        /// \return 拾取候选集
        static OwnerPtr<IPickResult> PickByPolygon(const IPolygonPickContext* pickContext);

        /// \brief 设置是否可以拾取被视口裁切掉的图形对象(默认可以拾取)
        /// 
        /// \param bCan true=可以拾取，false=不可以拾取        
        static void SetCanPickViewportCuttedGraphics(bool bCan);
    };

}// namespace gcmp

